/**
 * @file       PagingByEditFieldStrategy.h
 * @brief      To  go paging according to the edit field
 * @author     Huabo Zheng
 * @date       Feb 2, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#ifndef PAGINGBYEDITFIELDSTRATEGY_H_
#define PAGINGBYEDITFIELDSTRATEGY_H_

#include "PagingStrategy.h"

namespace NS_LCD_AFW
{

/**
 *@class  CPagingByEditFieldStrategy
 *@brief  To  go paging according to the edit field
 */
class CPagingByEditFieldStrategy: public NS_LCD_AFW::CPagingStrategy
{
public:

	/**
	 *@brief Constructor
	 */
	CPagingByEditFieldStrategy();

	/**
	*@brief DeConstructor
	*/
	virtual ~CPagingByEditFieldStrategy();

public:

	/**
	 *@brief  Calculate page result
	 *@details     Calculate page result
	 *@param[in]  framePtrArray A array object that pointer to CFrame pointer object
	 *@param[in]  parentRect    The Rect of parent frame object
	 *@param[in]  pageResult    initial paging information
	 *@param[out] pageResult    Paging result
	 *@exception none
	 *@retval    int
	 *@return    ERR_SUCCESS if success,otherwise failure
	 *@note
	 *@attention
	*/
	virtual int calculatePaging(const CFramePtrArray &framePtrArray,
			const CRect &parentRect, CPageInfo &pageResult);


	/**
	 *@brief  Calculate the view port
	 *@details    Calculate the view port
	 *@param[in]  framePtrArray A array object that pointer to CFrame pointer object
	 *@param[in]  parentRect    The Rect of parent frame object
	 *@param[in]  pageResult    initial paging information
	 *@param[out] pageResult    Paging result
	 *@exception none
	 *@retval    int
	 *@return    ERR_SUCCESS if success,otherwise failure
	 *@note
	 *@attention
	*/
	virtual int calculateViewPort(const CFramePtrArray &framePtrArray,
			const CRect &parentRect, CPageInfo &pageResult);
};

} /* namespace NS_LCD_AFW */
#endif /* PAGINGBYEDITFIELDSTRATEGY_H_ */
